

if [ -n "$1" ] ;then
    build_ext_dir=-$1
    install_ext_dir=/$1
else
    build_ext_dir=
    install_ext_dir=
fi

rm zz-build-linux$build_ext_dir/CMakeCache.txt

cmake 	-B zz-build-linux$build_ext_dir \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_PREFIX_PATH=/mnt/c/install/linux$install_ext_dir \
		-DCMAKE_INSTALL_PREFIX=/mnt/c/install/linux$install_ext_dir/yate \
		./

if [ $? -ne 0 ];then
	echo cmake $src_dir error
	exit 1
fi

cmake --build zz-build-linux$build_ext_dir  -j10

if [ $? -ne 0 ];then
	echo build build-linux$build_ext_dir error
	exit 1
fi

cmake --install zz-build-linux$build_ext_dir

if [ $? -ne 0 ];then
	echo install build-linux$build_ext_dir error
	exit 1
fi

exit 0
